<!DOCTYPE html>
<html lang="">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0,maximum-scale=1.0,user-scalable=0">
    <link rel="stylesheet" href="css/yzb_mobile.css">
    <title></title>
</head>

<body>
<div class="main">
<div class="wifi_info">
    <img src="images/wifi/wifi1.jpg" alt="">
    <img src="images/wifi/wifi2.jpg" alt="">
    <img src="images/wifi/wifi3.jpg" alt="">
    <img src="images/wifi/wifi4.jpg" alt="">
    <img src="images/wifi/wifi5.jpg" alt="">
    <img src="images/wifi/wifi6.jpg" alt="">
</div>
<div class="sign_group">
    <div class="sign_select clearfix">
        <a href="javascript:void(0)" class="sign_select_btn btn1 actived"><span>企业注册</span></a>
        <a href="javascript:void(0)" class="sign_select_btn btn2"><span>个人注册</span></a>
    </div>
    <div class="sign_wrap1 show">
    <form action="">
    <h2 class="sign_tit">注册云中宝</h2>
    <div class="form_group">
        <label class="form_label" for="">登录手机号</label>
        <input class="form_input" type="text" placeholder="请输入手机号">
    </div>
    <div class="form_group">
        <label class="form_label" for="">登录密码</label>
        <input class="form_input" type="text" placeholder="请输入密码">
    </div>
    <div class="form_group">
        <label class="form_label" for="">确认密码</label>
        <input class="form_input" type="text" placeholder="请再次输入">
    </div>
    <h2 class="sign_tit">企业详细资料</h2>
    <div class="form_group">
        <label class="form_label" for="">公司名称</label>
        <input class="form_input" type="text" placeholder="请输入公司名称">
    </div> 
    <div class="form_group">
        <label class="form_label" for="">联系人姓名</label>
        <input class="form_input" type="text" placeholder="请输入联系人">
    </div> 
    <div class="form_group">
        <label class="form_label" for="">联系人手机</label>
        <input class="form_input" type="text" placeholder="请输入手机号">
    </div> 
    <div class="form_group vlnum_wrap">
        <label class="form_label" for="">验证码</label>
        <div>
        <input class="form_input w_3_3" type="text" placeholder="请输入验证码">    
        <img class="form_input vlnum" src="images/icon/back1.png" />    
        <span class="change_vlnum">看不清？<a href="javascript:void(0)">换一张</a></span>    
        </div>	
    </div>
    <div class="form_group form_btn">
        <a href="javascript:void(0)" class="btn">完&nbsp;&nbsp;&nbsp;&nbsp;成</a>
    </div>       
    </form>
    
    </div>
    <div class="sign_wrap2">
    <form action="">
    <h2 class="sign_tit">注册云中宝</h2>
    <div class="form_group">
        <label class="form_label" for="">登录手机号</label>
        <input class="form_input" type="text" placeholder="请输入手机号">
    </div>
    <div class="form_group">
        <label class="form_label" for="">登录密码</label>
        <input class="form_input" type="text" placeholder="请输入密码">
    </div>
    <div class="form_group">
        <label class="form_label" for="">确认密码</label>
        <input class="form_input" type="text" placeholder="请再次输入">
    </div>
    <div class="form_group vlnum_wrap">
        <label class="form_label" for="">验证码</label>
        <div>
        <input class="form_input w_3_3" type="text" placeholder="请输入验证码">    
        <img class="form_input vlnum" src="images/icon/back1.png" />    
        <span class="change_vlnum">看不清？<a href="javascript:void(0)">换一张</a></span>    
        </div>	
    </div>
    <div class="form_group agreed">
        <input class="form_input" style="" type="checkbox" checked><span>同意云中宝协议</span>
    </div>
    <div class="form_group form_btn">
        <a href="javascript:void(0)" class="btn">完&nbsp;&nbsp;&nbsp;&nbsp;成</a>
    </div> 
    </form> 
    </div>
    
</div>
<div class="wifi_info">
    <img src="images/wifi/wifi7.jpg" alt="">
    <a href="tel:4006986808"></a>
</div>
<script>
var _btn1 = document.querySelector('.btn1')
var _btn2 = document.querySelector('.btn2')
var _sign_wrap1 = document.querySelector('.sign_wrap1')
var _sign_wrap2 = document.querySelector('.sign_wrap2')
_btn1.onclick= function(){
    if(!hasClass(this,'actived')){
        addClass(this,'actived')
        removeClass(_btn2,'actived')
        addClass(_sign_wrap1,'show')
        removeClass(_sign_wrap2,'show')
    }
}
_btn2.onclick= function(){
    if(!hasClass(this,'actived')){
        addClass(this,'actived')
        removeClass(_btn1,'actived')
        addClass(_sign_wrap2,'show')
        removeClass(_sign_wrap1,'show')
    }
}
function hasClass(el,cls){
    var elClsArr = el.className.split(' ');
    for(var i=0,len=elClsArr.length;i<len;i++){
        if(elClsArr[i] == cls){
            return true
        }
    }
    return false
}
function addClass(el,cls){
    var elClsArr = el.className.split(' ');
    for(var i=0,len=elClsArr.length;i<len;i++){
        if(elClsArr[i] == cls){
            return false
        }
    }
    el.className += (' '+cls)
}
// removeClass, takes two params: element and classname
function removeClass(el, cls) {
  var reg = new RegExp("(\\s|^)" + cls + "(\\s|$)");
  el.className = el.className.replace(reg, " ").replace(/(^\s*)|(\s*$)/g,"");
}    
</script>    
</div>   
</body>
</html>